package practice04;

/**
 * @author Administrator
 * @version V1.0
 * @ProjectName:IntelliJ IDEA
 * @PackageName: practice04
 * @ClassName: Dog
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @date 2019/12/10 9:39
 * @Copyright 大牛版板所有
 */
public class Dog extends Animal {
    private String color;

    public Dog() {
    }

    public Dog(String name, int age, String color) {
        super(name, age);
        this.color = color;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    @Override
    public void eat(){
        System.out.println("吃骨头!");
    }

    public void shout(){
        System.out.println("向陌生人吠叫！");
    }
}
